var e = getApp();

Component({
    properties: {
        show: {
            type: Boolean,
            value: !1
        },
        member: {
            type: Boolean,
            value: !1
        },
        info_basic_member_team: {
            type: String,
            value: ""
        }
    },
    data: {
        nameVal: ""
    },
    observers: {
        show: function(e) {}
    },
    lifetimes: {
        attached: function() {}
    },
    methods: {
        tapinp: function(e) {
            this.setData({
                nameVal: e.detail
            });
        },
        cancelTap: function() {
            this.triggerEvent("childShow", !1);
        },
        confirmTap: function() {
            var t = this;
            if (console.log("dddddddd", e._isTextEmpty(this.data.nameVal)), !e._isTextEmpty(this.data.nameVal)) {
                var a = "";
                a = this.data.member ? e.getNetAddresss("plugin.member-team.frontend.controllers.team.edit") : e.getNetAddresss("plugin.member-team.frontend.controllers.team.add");
                var n = {
                    team_name: this.data.nameVal,
                    basic_info: 1
                };
                e._getNetWork({
                    url: a,
                    data: n,
                    success: function(e) {
                        var a = e.data;
                        1 == a.result ? (t.triggerEvent("childShow", !1), console.log(a.data.name, "wwwwwwwwddd"), 
                        t.triggerEvent("editTeamName", a.data.name), wx.showToast({
                            title: a.msg,
                            duration: 1e3,
                            icon: "none"
                        })) : (t.triggerEvent("childShow", !1), wx.showToast({
                            title: a.msg,
                            duration: 1e3,
                            icon: "none"
                        }));
                    }
                });
            }
        }
    }
});